package com.jueecy.service.Impl;

import com.jueecy.mapper.UserMapper;
import com.jueecy.pojo.User;
import com.jueecy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    //查询注册用户是否存在
    public String searchUser(String email) {
        System.out.println("*****************进入UserService/searchUser*********"+email);
        System.out.println("UserService调用mapper返回"+userMapper.searchUser(email));
        return userMapper.searchUser(email);
    }

    @Override
    //新增用户
    public Integer addUser(User user) {
        return userMapper.addUser(user);
    }

    @Override
    //登录用户，判断是否存在
    public User userLogin(User user) {
        return userMapper.userLogin(user);
    }

    @Override
    public Integer editPerson(User user) {
        return userMapper.editPerson(user);
    }

    @Override
    public User userPerson(Integer user_id) {
        return userMapper.userPerson(user_id);
    }

    @Override
    public String goodsOldOrderWeChat(Integer user_id) {
        return userMapper.goodsOldOrderWeChat(user_id);
    }


}
